package IO;

import java.io.File;

public class DirectoryDemo {
    public static void main(String[] args) {
        File file = new File("D:/b/c");
//        System.out.println(file.mkdir());
//        System.out.println(file.mkdirs());
//        System.out.println(file.exists());
//        System.out.println(file.isDirectory());
//        System.out.println(file.getName());
//        System.out.println(file.getParent());
//        System.out.println(file.getParentFile().getName());

        File file2 = new File("d:/");
        String[] arr = file2.list();
        for(String s:arr){
            System.out.println(s);
        }
        System.out.println("------------");
        File[] arr2 = file2.listFiles();
        for(File f: arr2){
            System.out.println(f);
        }
    }
}
